/*
 * Copyright (c) 2006-2021, Ulandlink Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-11-18      wxl    first version
 */

#include <at_device_r6.h>
#include "drv_uart.h"
#include <pin.h>
#include "drv_gpio.h"

#define LOG_TAG                        "at.client.r6"
#include <at_log.h>

#define R6_CLIENT_NAME                PCIE_UART_NAME
#define MAIN_POWER_PIN				  GET_PIN(B,9)
#define R6_POWER_PIN                  GET_PIN(A,8)    //PA8  
#define R6_RESET_PIN                  GET_PIN(E,4)   //PE4
#define R6_RECV_BUFF_LEN              (1024)

static struct at_device_r6 r0 =
{
    .device_name        = R6_DEIVCE_NAME,
    .client_name        = R6_CLIENT_NAME,

	.main_power_pin		= MAIN_POWER_PIN,
    .power_pin          = R6_POWER_PIN,
    .reset_pin          = R6_RESET_PIN,
    .recv_line_num      = R6_RECV_BUFF_LEN,
};

int r6_device_register(void)
{
    struct at_device_r6 *r6 = &r0;

    return at_device_register(&(r6->device),
                              r6->device_name,
                              r6->client_name,
                              AT_DEVICE_CLASS_R6,
                              (void *) r6);
}

